package com.lory;

import com.netflix.loadbalancer.RandomRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName ServiceConsumerApplication
 * @Description TODO
 * @Author lory
 * @Date 2021/7/22 15:15
 * @Version TODO
 **/
@SpringBootApplication
public class ServiceConsumerApplication {

    @Bean
    //@LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

    /*@Bean
    public RandomRule randomRule(){
        return new RandomRule();
    }
*/
    public static void main(String[] args) {
        SpringApplication.run(ServiceConsumerApplication.class, args);
    }
}
